Bug 651224 - Potential NULL display ptr from quartz gtk_clipboard_wait_for_contents
authorJohn Ralls <jralls@ceridwen.us>
Sat, 28 Sep 2013 17:55:22 +0000 (10:55 -0700)
committerJohn Ralls <jralls@ceridwen.us>
Sat, 28 Sep 2013 17:55:22 +0000 (10:55 -0700)
gtk/gtkclipboard-quartz.c

index ab7732bf1c76c17d06c2da809319d8c9c7c1bdcb..a68d1cf38821be1932acb1b125f025885319cd6e 100644 (file)
@@ -701,10 +701,12 @@ gtk_clipboard_wait_for_contents (GtkClipboard *clipboard,
       GdkAtom *atoms;
 
       length = [types count] * sizeof (GdkAtom);
-      
+
       selection_data = g_slice_new0 (GtkSelectionData);
       selection_data->selection = clipboard->selection;
       selection_data->target = target;
+      if (!selection_data->display)
+       selection_data->display = gdk_display_get_default ();
 
       atoms = g_malloc (length);